]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowPreview: Consider chrome overlaps when offscreening for opacity
authorSebastian Keller <skeller@gnome.org>
Tue, 16 Feb 2021 10:45:50 +0000 (11:45 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 16 Feb 2021 13:29:00 +0000 (13:29 +0000)
The icon and close button might be overlapping the window actor but
were not considered in has_overlaps() which gets used to decide whether
to offscreen the actor for transparency. Since currently the icon is
visible when the preview is dragged and the whole actor is turned
transparent, the opacity will not be applied to everything as a whole
but the child actors individually. This leads to the window becoming
visible behind the icon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1684>

js/ui/windowPreview.js

index 12215e0525a21c43216b9d0d7f48a495dbdcf23f..996d66bf551173715746551608fa239cd86ffeb8 100644 (file)
@@ -595,7 +595,9 @@ var WindowPreview = GObject.registerClass({
     }
 
     vfunc_has_overlaps() {
-        return this._hasAttachedDialogs();
+        return this._hasAttachedDialogs() ||
+            this._icon.visible ||
+            this._closeButton.visible;
     }
 
     _deleteAll() {